import { computed, ref } from 'vue'
import { defineStore } from 'pinia'

export const useUserStore = defineStore(
  'user',
  () => {
    const token = ref('admin_token')
    const userInfo = ref({})
    const roles = ref([])
    const permissions = ref([])

    return {
      token,
      userInfo,
      roles,
      permissions,
    }
  },
  {
    persist: true,
  }
)
